<!-- 1 定义组件模版 -->
<template>
    <div class="child">

        <!-- modelValue：{{ modelValue }} -->


        <input type="text" v-model="model">
    </div>

</template>

<!-- 2 定义组件逻辑 -->
<script setup lang="ts" name="MyInput">
import { ref } from 'vue'

//3.4+  https://cn.vuejs.org/guide/components/v-model#under-the-hood
const model = defineModel({ default: 0 })


</script>

<!-- 3 定义样式 -->
<style scoped>
input {
    background-color: aquamarine;
}

.child {

    min-height: 100px;
    background-color: rgb(170, 181, 182);
    border-radius: 10px;
    padding: 5px;
    margin: 5px
}
</style>